rf: Use ondiagnostics tools to fetch data#3
Merged
Conversation
Create the openneuro-dashboard package under code/ with: - pyproject.toml declaring ondiagnostics as an editable dependency - Typer CLI skeleton with all 7 subcommands (stubs) - Test directory structure (unit, integration, fixtures) - Shared test fixtures (conftest.py) for GraphQL, git, and S3 mocking
SCHEMA_VERSION, format_timestamp, write_json, load_json, load_json_safe
Replace local GraphQL types with ondiagnostics.graphql imports. Use get_page(include_snapshots=True) from ondiagnostics.
Replace local SubprocessResult/git with ondiagnostics.tasks.git.list_refs.
Dashboard-specific DOI parsing and version extraction.
Replace local git() with ondiagnostics.subprocs.git. Keep local S3 listing for unsigned access.
Dashboard-specific status aggregation and precedence logic.
Connect fetch-graphql, check-github, check-s3-version, check-s3-files, and summarize to their migrated modules. Implement run-all to execute all stages in sequence.
Tests for DOI parsing, status aggregation, diff computation, and shared utilities. 28 tests passing.
Pin ondiagnostics>=0.1.0, document which ondiagnostics modules are used and what dashboard-specific logic remains.
Migrate graphql, github, s3_version, git_tree, and s3_diff generators into the openneuro_dashboard.gen_data package.
Orchestrate all generators: graphql → github → s3_version → git_tree → s3_diff → summarize.
5 datasets covering healthy, blocked, version-mismatch, warning, and export-missing states. Integration test verifies summarize stage produces correct aggregated statuses.
All pipeline stages and gen_data generators have been migrated to the openneuro_dashboard package under code/.
Replace individual script invocations with openneuro-dashboard run-all command. Bump Python to 3.14.
Document CLI usage, development setup, and test running.
get_page() calls execute_async() which is a Client method, not an AsyncClientSession method. Remove the async-with wrapper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
Some inconsistencies remain, e.g., we still use
print()statements whereondiagnosticsuses structlog, so the output's a little wonky. Not a major concern here, though.